/* <e-Adventure> (formerly <e-Game>) is a research project of the <e-UCM>
*         research group.
*  
*   Copyright 2005-2010 <e-UCM> research group.
* 
*   You can access a list of all the contributors to <e-Adventure> at:
*         http://e-adventure.e-ucm.es/contributors
* 
*   <e-UCM> is a research group of the Department of Software Engineering
*         and Artificial Intelligence at the Complutense University of Madrid
*         (School of Computer Science).
* 
*         C Profesor Jose Garcia Santesmases sn,
*         28040 Madrid (Madrid), Spain.
* 
*         For more info please visit:  <http://e-adventure.e-ucm.es> or
*         <http://www.e-ucm.es>
* 
* ****************************************************************************
* 
* This file is part of <e-Adventure>, version 1.2.
* 
*     <e-Adventure> is free software: you can redistribute it and/or modify
*     it under the terms of the GNU Lesser General Public License as published by
*     the Free Software Foundation, either version 3 of the License, or
*     (at your option) any later version.
* 
*     <e-Adventure> is distributed in the hope that it will be useful,
*     but WITHOUT ANY WARRANTY; without even the implied warranty of
*     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
*     GNU Lesser General Public License for more details.
* 
*     You should have received a copy of the GNU Lesser General Public License
*     along with <e-Adventure>.  If not, see <http://www.gnu.org/licenses/>.
******************************************************************************/

package es.eucm.eadandroid.common.auxiliar;

import java.util.ArrayList;
import java.util.List;

/**
* 
* This class is used to store all the element with asset present in a chapter when it is imported.
*
*/
public class AllElementsWithAssets {

   /**
    * Check if store or not in allAssets list
    */
   private static boolean storePath = false;
   
   /**
    * Store all the elements with assets an their references
    */
   private static final List<Object> allAssets = new ArrayList<Object>();
   
   /**
    * change the storePath attribute
    * @param store
    */
   public static void setStorePath(boolean store) {
       storePath = store;
   }
   
   /**
    * Store the element with asset if storePath att allows for it
    * 
    * @param value
    * @param key
    */
   public static void addAsset(Object element){
       if (storePath)
           allAssets.add( element );
   }
   
   /**
    * Clear the allAssets structure
    */
   public static void resetAllAssets(){
       allAssets.clear( );
   }
   
   /**
    * Return the allAssets
    */
   public static List<Object> getAllAssets(){
       return allAssets;
   }
   
   
}

